test 2
calculate_area(radius:float)
Calculate the area of a circle.
Parameters:
radius
(float): The radius of the circle in meters.
Returns:
float
: The area of the circle in square meters.Examples:
>>> calculate_area(2.0)
12.566370614359172
Labels:
src_PyThon_Test_test
2_calculate_areagreet(name:str, times:int)
Print a greeting message multiple times.
Parameters:
name
(str): The name to greet.times
(int): Number of times to repeat the greeting (default: 1).
Raises:
ValueError
: If times is negative.
Examples:
>>> greet("Alice", 3)
Notes:
This function is a simple demonstration of how to use docstrings.
See_also:
- `calculate_area`: A function that calculates the area of a circle.
Caution:
Ensure that the 'times' parameter is not negative.
Warning:
This function does not handle non-string names gracefully.
greet
Labels:
src_PyThon_Test_test
2_greet